<script>
	var width_td = 350;
</script>
<#if formField.hidden?? && formField.hidden=="1">
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	<input type=hidden id=${field.name} name="fieldMap['${field.name}'].value" <#if businessInstanceField??>value="${businessInstanceField.value}"</#if>></input>
<#else>
	<input type=hidden name="fieldMap['${field.name}'].id"  <#if businessInstanceField?? && businessInstanceField.id??>value="${businessInstanceField.id}"</#if>>
	<input type=hidden name="fieldMap['${field.name}'].field.id"  value="${formField.field.id}">
	<input type=hidden name="${field.name}" id="valid${field.name}" <#if planTerget_list?? && planTerget_list?size gt 0>value="${planTerget_list?size}"</#if>>
	<#if !formField.readonly?? || formField.readonly=="0">
	<div id ="tableDiv" style="overflow:auto;" >
	
		<table cellspacing="1" cellpadding="0" width ="100%" class="listviewTable" >
			<tr class="listviewTR" id="title_tr">
				<th class="listviewTD" align="center"  >
					<span>序号</span>
				</th>
				<th class="listviewTD" align="center"  >
					<span>指标类型</span>
				</th>
				<th class="listviewTD" align="center"  >
					<span>指标名称</span>
				</th>
				<th class="listviewTD" align="center" >
					<span>单位</span>
				</th>
				
				<#assign td_index=1>
				<#list title_list as title>
					<th id="${td_index}_id" class="listviewTD" align="center"  >
						${title}
					</th>
					<script>
						width_td = width_td + $("#${td_index}_id").width();
					</script>
					<#assign td_index=td_index+1>
				</#list>
				<script>
				  if(width_td<window.document.body.clientWidth){
				  		$("#title_tr").append($("<th class='listviewTD'></th>"));
				  }
				</script>
			</tr>
							
			<#if planTerget_list??>
			<#assign index=1>
				<#list planTerget_list as planTarget>
					<tr class="listviewTR" id="data_tr_${index}">
						<td class="listviewTD" align="center"  >
							${index}
						</td>
						<td class="listviewTD" align="center"  >
							${planTarget.planTargetD.targetTypeName?default('')}
						</td>
						<td class="listviewTD" align="center"  >
							${planTarget.planTargetD.targetName?default('')}
						</td>
						<td class="listviewTD" align="center"  >
							${planTarget.planTargetD.unit?default('')} 
						</td>
						<#list title_list as title>
							<td class="listviewTD" align="center"  >
						    	${planTarget.yearMap[title]?default('')}
						    </td>
						</#list>
						<script>
							if(width_td<window.document.body.clientWidth){
					  			$("#data_tr_${index}").append($("<td class='listviewTD'></td>"));
					  		}
				  		</script>
					</tr>
					<#assign index=index+1>
				</#list>
			</#if>
		</table>
		</div>
	</#if>
</#if>


<script>
$(window).resize(historyMothLayout);
	function historyMothLayout(){
		$("#tableDiv").css("width",window.document.body.clientWidth-10);
		$("#tableDiv").css("height",window.document.body.clientHeight-68);
	}
	$(function(){
		historyMothLayout();
	})
</script>